<template>
    <div class="main">
        <el-link type="danger" :underline="false" style="color:blueviolet;" @click="exit">退出</el-link>
    </div>
</template>
<script>
export default {
    name:'Exit',
    methods:{
        exit(){
            this.$confirm('确认退出吗?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                sessionStorage.clear();
                this.$router.replace('/')
            }).catch(() => {});
        }
    }
}
</script>
<style lang="less" scoped>
.main{
    line-height: 65px;
    float: right;  
}
.el-link{
    font-size: 20px;
}
</style>